home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 11 / CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso / cucd / graphics / mpimage / install-mpimage < prev    next >
Text File  |  1997-02-16  |  6KB  |  304 lines

  1. ; MPImage - Amiga Image Conversion
  2. ; Copyright (C) © 1996 Mark John Paddock
  3. ;
  4. ; This program is free software; you can redistribute it and/or modify
  5. ; it under the terms of the GNU General Public License as published by
  6. ; the Free Software Foundation; either version 2 of the License, or
  7. ; any later version.
  8.  
  9. ; This program is distributed in the hope that it will be useful,
  10. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. ; GNU General Public License for more details.
  13.  
  14. ; You should have received a copy of the GNU General Public License
  15. ; along with this program; if not, write to the Free Software
  16. ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. ; mark@topic.demon.co.uk
  19. ; mpaddock@cix.compulink.co.uk
  20. ; MPImage - Amiga Image program
  21. ; Copyright (C) © 1993-96 Mark John Paddock
  22.  
  23. ; mark@topic.demon.co.uk
  24. ; mpaddock@cix.compulink.co.uk
  25.  
  26. ; This is the script to install MPImage
  27. ; $VER: Install-MPImage 7.2 (16.2.97)
  28.  
  29. (complete 10)
  30.  
  31. ;Check where to install libraries
  32. (Set #LibChoice
  33.     (askchoice
  34.         (prompt "Where do you want to install the libraries?\n\n"
  35.             "You can choose to install the libraries required by MPImage "
  36.             "in the current directory, "
  37.             "your LIBS: directory, or some other directory.")
  38.         (help @askchoice-help)
  39.         (choices "In Place" "LIBS:" "Elsewhere")
  40.         (default 1)
  41.     )
  42. )
  43.  
  44. (complete 20)
  45.  
  46. (if (= #LibChoice 2)
  47.     (Set #LibDir
  48.         (askdir
  49.             (prompt "Select directory in which to install the MPImage libraries")
  50.             (help @askdir-help)
  51.             (default "LIBS:")
  52.         )
  53.     )
  54. )
  55.  
  56. (complete 30)
  57.  
  58. ; Set up directory names
  59. (Set #DestDir (expandpath ""))
  60.  
  61. (if (= #libchoice 0)
  62.     (Set #LibDir #DestDir)
  63. )
  64.  
  65. (if (= #libchoice 1)
  66.     (Set #LibDir "LIBS:")
  67. )
  68.  
  69. (set @default-dest 
  70.     #DestDir
  71. )
  72.  
  73. ; Determine machine config
  74. (Set #Has020
  75.     (=
  76.         (database "cpu")
  77.         68020
  78.     )
  79. )
  80. (Set #Has030
  81.     (=
  82.         (database "cpu")
  83.         68030
  84.     )
  85. )
  86. (Set #Has040
  87.     (= 
  88.         (database "cpu")
  89.         68040
  90.     )
  91. )
  92. (Set #Has060
  93.     (= 
  94.         (database "cpu")
  95.         68060
  96.     )
  97. )
  98. (Set #HasFPU
  99.     (<>
  100.         (database "fpu")
  101.         "NOFPU"
  102.     )
  103. )
  104.  
  105. (Set #CPU 0)
  106. (if #Has020
  107.     (Set #CPU 1)
  108. )
  109. (if #Has030
  110.     (Set #CPU 1)
  111. )
  112. (if (AND #Has020 #HasFPU)
  113.     (Set #CPU 2)
  114. )
  115. (if (AND #Has030 #HasFPU)
  116.     (Set #CPU 2)
  117. )
  118. (if (AND #Has040 #HasFPU)
  119.     (Set #CPU 3)
  120. )
  121. (if #Has060
  122.     (Set #CPU 4)
  123. )
  124.  
  125. (Set #DestLib "MPImage.library")
  126.  
  127. (Set #DestGui "MPGui.library")
  128.  
  129. (Set #SrcGui "libs/MPGui.library")
  130.  
  131. (complete 40)
  132.  
  133. ; Check choice of program to install
  134. (set #CPU
  135.     (askchoice
  136.         (prompt "Install which version?")
  137.         (help "There are five versions of the MPImage.library. "
  138.                 "The first requires just a 68000. "
  139.                 "The second requires a 68020. "
  140.                 "The third requires both a 68020 or 68030 CPU with a 68881 or 68882 FPU. "
  141.                 "The forth requires a 68040. "
  142.                 "The last requires a 68060.")
  143.         (choices
  144.             "68000"
  145.             "68020"
  146.             "68020/030/68881/2"
  147.             "68040"
  148.             "68060"
  149.         )
  150.         (default #CPU)
  151.     )
  152. )
  153.  
  154. (complete 50)
  155.  
  156. (if (= #CPU 4)
  157.      (set #SrcLib "libs/MPImage.library.060")
  158. )
  159. (if (= #CPU 3)
  160.      (set #SrcLib "libs/MPImage.library.040")
  161. )
  162. (if (= #CPU 2)
  163.      (set #SrcLib "libs/MPImage.library.881")
  164. )
  165. (if (= #CPU 1)
  166.      (set #SrcLib "libs/MPImage.library.020")
  167. )
  168. (if (= #CPU 0)
  169.      (set #SrcLib "libs/MPImage.library.000")
  170. )
  171.  
  172. (complete 60)
  173.  
  174. ; Copy libraries
  175. (
  176.     (copylib
  177.         (source #SrcGui)
  178.         (dest #LibDir)
  179.         (newname #DestGui)
  180.     )
  181. )
  182.  
  183. (complete 70)
  184.  
  185. (
  186.     (copylib
  187.         (source #SrcLib)
  188.         (dest #LibDir)
  189.         (newname #DestLib)
  190.     )
  191. )
  192.  
  193. (complete 80)
  194.  
  195. (if
  196.     (askbool
  197.         (prompt "Do you have djpeg and cjpeg?")
  198.         (help "Select 'Yes' if you have cjpeg and djpeg and you wish to "
  199.                 "use them to load and save jpeg files.")
  200.           (default 0)
  201.     )
  202.     (
  203.         (makedir
  204.             "ENV:MPImage"
  205.         )
  206.         (makedir
  207.             "ENVARC:MPImage"
  208.         )
  209.         (set #cjpeg
  210.             (askstring
  211.                 (prompt "Enter your command to run cjpeg")
  212.                 (help '"%s" should be used to in place of the input and '
  213.                         "output files. Depending on how cjpeg was compiled "
  214.                         "you may/may not need to supply < before the input file "
  215.                         "and/or > before the output file.")
  216.                 (default 'cjpeg "%s" "%s"')
  217.             )
  218.         )
  219.         (textfile
  220.             (dest "ENV:MPImage/cjpeg")
  221.             (append #cjpeg)
  222.         )
  223.         (textfile
  224.             (dest "ENVARC:MPImage/cjpeg")
  225.             (append #cjpeg)
  226.         )
  227.         (set #djpeg
  228.             (askstring
  229.                 (prompt "Enter your command to run djpeg")
  230.                 (help '"%s" should be used to in place of the input and '
  231.                         "output files. Depending on how djpeg was compiled "
  232.                         "you may/may not need to supply < before the input file "
  233.                         "and/or > before the output file.")
  234.                 (default 'djpeg "%s" "%s"')
  235.             )
  236.         )
  237.         (textfile
  238.             (dest "ENV:MPImage/djpeg")
  239.             (append #djpeg)
  240.         )
  241.         (textfile
  242.             (dest "ENVARC:MPImage/djpeg")
  243.             (append #djpeg)
  244.         )
  245.     )
  246. )
  247.  
  248. (complete 90)
  249.  
  250. (if
  251.     (askbool
  252.         (prompt "Do you have pngtopnm and pnmtopng?")
  253.         (help "Select 'Yes' if you have pngtopnm and pnmtopng and you wish to "
  254.                 "use them to load and save PNG files.")
  255.           (default 0)
  256.     )
  257.     (
  258.         (makedir
  259.             "ENV:MPImage"
  260.         )
  261.         (makedir
  262.             "ENVARC:MPImage"
  263.         )
  264.         (set #pnmtopng
  265.             (askstring
  266.                 (prompt "Enter your command to run pnmtopng")
  267.                 (help '"%s" should be used to in place of the input and '
  268.                         "output files. Depending on how pnmtopng was compiled "
  269.                         "you may/may not need to supply < before the input file "
  270.                         "and/or > before the output file.")
  271.                 (default 'pnmtopng "%s" >"%s"')
  272.             )
  273.         )
  274.         (textfile
  275.             (dest "ENV:MPImage/pnmtopng")
  276.             (append #pnmtopng)
  277.         )
  278.         (textfile
  279.             (dest "ENVARC:MPImage/pnmtopng")
  280.             (append #pnmtopng)
  281.         )
  282.         (set #pngtopnm
  283.             (askstring
  284.                 (prompt "Enter your command to run pngtopnm")
  285.                 (help '"%s" should be used to in place of the input and '
  286.                         "output files. Depending on how pngtopnm was compiled "
  287.                         "you may/may not need to supply < before the input file "
  288.                         "and/or > before the output file.")
  289.                 (default 'pngtopnm "%s" >"%s"')
  290.             )
  291.         )
  292.         (textfile
  293.             (dest "ENV:MPImage/pngtopnm")
  294.             (append #pngtopnm)
  295.         )
  296.         (textfile
  297.             (dest "ENVARC:MPImage/pngtopnm")
  298.             (append #pngtopnm)
  299.         )
  300.     )
  301. )
  302.  
  303. (complete 100)
  304.